package com.example.mybatis.utils;

import java.io.IOException;
import java.util.Properties;

public class PropertiesManager {
    private  static final String JDBC_CONFIG_PATH = "jdbc.properties";
    private static Properties configs;
    static {
        configs = new Properties();
        try {
            configs.load(Thread.currentThread().getContextClassLoader()
                    .getResourceAsStream(JDBC_CONFIG_PATH));
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

    public static String getProperty(String key) {
        return configs.getProperty(key);
    }


}
